package cn.itcast.spring3.demo1;

import org.springframework.jdbc.core.support.JdbcDaoSupport;

public class AccountDaoImpl extends JdbcDaoSupport implements AccountDao {

	
	public AccountDaoImpl() {
		
	}

	public void out(String from, Double money) {
		String sql="update account set money=money-? where name =?";
		this.getJdbcTemplate().update(sql, money,from);

	}

	public void in(String to, Double money) {
		String sql="update account set money=money+? where name =?";
		this.getJdbcTemplate().update(sql, money,to);


	}

}
